#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Author: Hui
# @Desc: { 赋值运算符测验 IPython测验 }
# @Date: 2021/06/06 0:12


# 等于、加等于、减等于赋值运算符测验
"""
In [57]: # 等于赋值运算

In [58]: a = 10

In [59]: b = 20

In [60]: c = a + b

In [61]: c
Out[61]: 30

In [62]: # 加等于

In [63]: a = 1

In [64]: a += 1

In [65]: a
Out[65]: 2

In [66]: # 减等于

In [67]: a = 10

In [68]: a -= 1

In [69]: a
Out[69]: 9
"""


# 乘等于、除等于、取整除赋值运算符测验
"""
In [70]: # 乘等于

In [71]: a = 10

In [72]: a *= 5

In [73]: a
Out[73]: 50

In [74]: # 除等于

In [75]: a = 100

In [76]: a /= 10

In [77]: a
Out[77]: 10.0

In [78]: # 取整除赋值运算

In [79]: a = 10

In [80]: a /= 3  # 普通除等于

In [81]: a
Out[81]: 3.3333333333333335

In [84]: a = 10

In [85]: a //= 3  # 取整除

In [86]: a
Out[86]: 3
"""


# 取余数、幂赋值运算符测验
"""
In [87]: # 取余数赋值运算

In [88]: a = 10

In [89]: a %= 3

In [90]: a
Out[90]: 1

In [91]: # 幂赋值运算

In [92]: a = 2

In [93]: a **= 3

In [94]: a
Out[94]: 8
"""
